<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>鼠标坐标</title>
</head>

<body>
<script type="text/javascript">
    var x = 0, y = 0;
    function MousePlace() {
        x = window.event.x;
        y = window.event.y;
        window.status = "X:" + x + " " + "Y:" + y;
    }
    document.onmousemove = MousePlace;
</script>
</body>
</html>